<div class="row">
	<div class="col-lg-12">
	<section class="panel">
	<header class="panel-heading">
	   添加
	</header>
		<div class="panel-body">
			<div class="form">
				<form class="cmxform form-horizontal tasi-form" name="myForm" novalidate="novalidate">
					<input ng-hide="true" ng-model="menu.id"/>
					<div class="form-group" ng-class="{'has-error': myForm.name.$dirty && myForm.name.$invalid}">
						<label class="control-label col-lg-2">名称</label>
						<div class="col-lg-5">
							<input class="form-control" name="name" ng-required="true" ng-maxlength="10" ng-model="menu.m_name" type="text"/>
						</div>
						<div ng-show="myForm.name.$dirty && myForm.name.$error.maxlength"
                             class="alert alert-danger help-block">
                            	不能超过5个字符
                        </div>
					</div>
					<div class="form-group">
						<label class="control-label col-lg-2">父级菜单</label>
						<div class="col-lg-5">
							<select ng-model="menu.m_parent_id" name="tel" class="form-control">
								<option value="">请选择</option>
								<option ng-repeat="list in menus" ng-selected="list.id==menu.m_parent_id" value="{{list.id}}" ng-bind="list.m_name"></option>
							</select>
						</div>
					</div>
					<div class="form-group" ng-class="{'has-error': myForm.loginName.$dirty && myForm.loginName.$invalid }">
						<label class="control-label col-lg-2">链接</label>
						<div class="col-lg-5">
							<input class="form-control" name="loginName" ng-required="true" ng-maxlength="32" ng-model="menu.m_url" type="text">
						</div>
						<div ng-show="myForm.loginName.$dirty && myForm.loginName.$error.maxlength"
                             class="alert alert-danger help-block">
                            	不能超过32个字符
                        </div>
					</div>
					<div class="form-group" ng-class="{'has-error' : myForm.password.$dirty && myForm.password.$invalid}">
						<label class="control-label col-lg-2">图标</label>
						<div class="col-lg-5">
							<input class="form-control" name="password" ng-maxlength="32" ng-required="true" ng-model="menu.m_icon" type="text"/>
						</div>
						<div ng-show="myForm.password.$dirty && myForm.password.$error.maxlength"
							 class="alert alert-danger help-block">
							不能超过32个字符
						</div>
					</div>
					<div class="form-group" ng-class="{'has-error' : myForm.sort.$dirty && myForm.sort.$invalid}">
						<label class="control-label col-lg-2">排序</label>
						<div class="col-lg-5">
							<input class="form-control" name="sort" ng-maxlength="32" ng-required="true" ng-model="menu.m_sort" type="text"/>
						</div>
						<div ng-show="myForm.sort.$dirty && myForm.sort.$error.maxlength"
							 class="alert alert-danger help-block">
							不能超过3个字符
						</div>
					</div>
					<div class="form-group">
						<div class="col-lg-offset-2 col-lg-10">
							<button class="btn btn-danger" ng-disabled="myForm.$invalid" type="button" ng-click="save()">保存</button>
							<button class="btn btn-default" type="button" ng-click="back()">取消</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</section>
	</div>
</div>